package org.springframework.test.zhaohui.service;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.stereotype.Service;

/**
 * HelloServicePostProcessor
 *
 * @author zhaohui
 */
@Service
public class HelloServicePostProcessor implements BeanPostProcessor {

	@Override
	public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
		if (bean instanceof HelloService) {
			System.out.println("Post processor bean = " + bean.getClass() + ", beanName =" + beanName);
		}
		return bean;
	}
}
